package org.huntaway.kernel.test;

import java.util.Date;

public class CleanThanMain {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		HuntaWayThread hwt = new HuntaWayThread() {
			public void runBody() {
				try {
					CleanThanBI ctb = new CleanThanBI();
					ctb.setBeginTime("2010-03-23 14:11:40");
					String sBegin = ctb.getBeginTime();
					TimesTools tit = new TimesTools();
					Date nowDate = new Date();
					System.out.println(nowDate + ":" + sBegin + "="
							+ nowDate.equals(sBegin));
					Date eqDate = tit.str2Time(sBegin, TimesTools.STY_24);
					if (nowDate.before(eqDate)) {
						System.out.println("Program is Run....");
					} else {
						sleep(1000);
					}
				} catch (NutException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				} catch (InterruptedException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
		};
		hwt.start();
	}

}
